//
//  SchduleDayCell.m
//  YunDongGym
//
//  Created by lqq on 2018/8/8.
//  Copyright © 2018年 lqq. All rights reserved.
//

#import "SchduleDayCell.h"

@interface SchduleDayCell ()
@property (weak, nonatomic) IBOutlet UIView *leftView;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UIView *thickView;
@property (weak, nonatomic) IBOutlet UIView *thinView;
@property (weak, nonatomic) IBOutlet UIView *backView;

@end

@implementation SchduleDayCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentView.backgroundColor = TP.controllerBackColor;
}

- (void)setCoachSchdule:(M_Schedule *)coachSchdule
{
    _coachSchdule = coachSchdule;
    if (coachSchdule.status) {//状态显示
        _leftView.hidden = NO;
        _backView.hidden = NO;
        _leftView.backgroundColor = HEXColor(coachSchdule.status);
        self.backView.backgroundColor = [UIColor colorWithHexString:coachSchdule.status alpha:0.2];
    } else {
        _leftView.hidden = YES;
        _backView.hidden = YES;
    }
    
    if (coachSchdule.enable) {
        _descLabel.text = @"";
    } else {
        _descLabel.text = coachSchdule.planContent;
    }
    
    
    if (coachSchdule.timeStr.length > 0) {
        _thickView.hidden = NO;
        _thinView.hidden = YES;
    } else {
        _thickView.hidden = YES;
        _thinView.hidden = NO;
    }
    
}

@end
